package com.candy.bean;

import java.util.Date;

public class Student {
//    属性
    public int stuNo;
    protected String stuName;
    boolean stuSex;
    private Date stuBirth;
    public static String stuSchool="山东航空学院";

//    构造方法（无参构造）
    public Student() {
        System.out.println("调用了构造方法");
    }
    //全参构造
    public Student(int stuNo, String stuName, boolean stuSex) {
        this.stuNo = stuNo;
        this.stuName = stuName;
        this.stuSex = stuSex;
    }

    static{

    }

    //    方法

    /**
     * 方法的定义，【访问控制修饰符】 返回值类型 方法名（形参列表{方法体}
     */
    public void study(){
        System.out.println("学习。。。");
        String school="山东航空";
        this.stuBirth=new Date();
    }


    public void sayHi(Teacher teacher){
        System.out.println("大家好，我是"+this.stuName);
        System.out.println("我的老师是："+teacher.teaName);
    }
    public static void sayBye(){
        System.out.println("再见");
    }

    public int getStuNo() {
        return stuNo;
    }

    public void setStuNo(int stuNo) {
        this.stuNo = stuNo;
    }

    public String getStuName() {
        return stuName;
    }

    public void setStuName(String stuName) {
        this.stuName = stuName;
    }

    public boolean isStuSex() {
        return stuSex;
    }

    public void setStuSex(boolean stuSex) {
        this.stuSex = stuSex;
    }

    public Date getStuBirth() {
        return stuBirth;
    }

    public void setStuBirth(Date stuBirth) {
        this.stuBirth = stuBirth;
    }
}
